<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head></h:head> 
<body>
	<h:messages></h:messages> 
	<h:form id="form1">
	<h:panelGrid cols="2">
			<h:outputText value="Nome:" for="nome" />
			<h:inputText id="nome" value="#{professorBean.professor.nome}"></h:inputText>
			<h:outputText value="Logradouro:" for="log" />
			<h:inputText id="log" value="#{professorBean.professor.endereco.rua}"></h:inputText>
			<h:outputText value="Bairro:" for="bairro"/>
			<h:inputText  id="bairro" value="#{professorBean.professor.endereco.bairro}"></h:inputText>
			<h:outputText value="Número:" for="numero" />
			<h:inputText id="numero" value="#{professorBean.professor.endereco.numero}"></h:inputText>
			<h:outputText value="CEP:" for="cep" />
			<h:inputText id="cep" value="#{professorBean.professor.endereco.cep}"></h:inputText>
		<h:outputText value="Cidade:" for="cidade"/>
		<h:selectOneMenu id="cidade" value="#{professorBean.professor.endereco.cidade}">
			<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
			<f:selectItems var="cidades" value="#{geraListaBean.listaCidade}" itemLabel="#{cidades.descricao}" itemValue="#{cidades.descricao}"></f:selectItems>
		</h:selectOneMenu>
		<h:outputText value="Estado:" for="estado"/>
		<h:selectOneMenu id="estado" value="#{professorBean.professor.endereco.estado}">
			<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
			<f:selectItems  var="estados" value="#{geraListaBean.listaEstado}" itemLabel="#{estados.descricao}" itemValue="#{estados.descricao}"></f:selectItems>
		</h:selectOneMenu>
		<h:outputText value="Pais:"/>
		<h:selectOneMenu id="pais" value="#{professorBean.professor.endereco.pais}">
			<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
			<f:selectItems var="paises" value="#{geraListaPais}" itemLabel="#{paises.descricao}" itemValue="#{paises.descricao}"></f:selectItems>
		</h:selectOneMenu>
		<h:outputText value="Telefone Fixo:" for="dddFixo"/>
		<h:selectOneMenu value="#{professorBean.professor.dddFixo}">
			<f:selectItem id="dddFixo" itemLabel="Selecione" itemValue=""></f:selectItem>
			<f:selectItems var="dddFixo" value="#{geraListaBean.listaDddFixo}" itemLabel="#{dddFixo.cod_Area}" itemValue="#{dddFixo.cod_Area}"></f:selectItems>
		</h:selectOneMenu>
		<h:outputText value="Telefone Celular:" for="dddCelular"/>
		<h:selectOneMenu id="dddCelular" value="#{professorBean.professor.dddCelular}">
			<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
			<f:selectItems var="dddCelular" value="#{geraListaBean.listaDddFixo}" itemLabel="#{dddCelular.cod_Area}" itemValue="#{dddCelular.cod_Area}"></f:selectItems>
		</h:selectOneMenu>
		<h:outputText value="Data de Nascimento:" for="dtNascimento"/>
		<h:selectOneMenu id="dtNascimento" value="#{professorBean.professor.dtAdmissao}">
			<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
		</h:selectOneMenu>
		<h:outputText value="Login" for="login" />
		<h:inputText id="login" value="#{professorBean.professor.login}" />
		<h:outputText value="Senha" for="senha" />
		<h:inputText id="senha" value="#{professorBean.professor.senha}" />
		<h:outputText value="Confirma Senha" for="confirmaSenha" />
		<h:inputText id="confirmaSenha" value="#{professorBean.professor.senha}" />
		<h:outputText value="Email" for="email" />
		<h:inputText id="email" value="#{professorBean.professor.email}" />
		<h:commandButton actionListener="#{professorBean.adicionarProfessor()}" value="Adicionar" />
			<h:commandButton actionListener="#{alunoBean.removerAluno()}" value="Remover"></h:commandButton>
		</h:panelGrid>
		<h:panelGrid>
			<h:dataTable value="#{professorBean.listaProfessor}" var="professor" border="1">
				<h:column>
					<f:facet name="header">Nome</f:facet>
						#{professor.nome}
				</h:column>
				<h:column>
					<f:facet name="header">Rua</f:facet>
						#{professor.endereco.rua}
				</h:column>
				<h:column>
					<f:facet name="header">Bairro</f:facet>
						#{professor.endereco.bairro}
				</h:column>
				<h:column>
					<f:facet name="header">Número</f:facet>
						#{professor.endereco.numero}.
				</h:column>
				<h:column>
					<f:facet name="header">CEP</f:facet>
						#{professor.endereco.cep}
				</h:column>
				<h:column>
					<f:facet name="header">Cidade</f:facet>
						#{professor.endereco.cidade}
				</h:column>
				<h:column>
					<f:facet name="header">Estado</f:facet>
						#{professor.endereco.estado}
				</h:column>
				<h:column>
					<f:facet name="header">Pais</f:facet>
						#{professor.endereco.pais}
				</h:column>
				<h:column>
					<f:facet name="header">Telefone Fixo</f:facet>
						#{professor.telFixo}
				</h:column>
				<h:column>
					<f:facet name="header"> Telefone Celular </f:facet>
						#{professor.telCelular}
				</h:column>
				<h:column>
					<f:facet name="header"> Login</f:facet>
						#{professor.login}
				</h:column>
				<h:column>
					<f:facet name="header"> Email</f:facet>
						#{professor.email}
				</h:column>
			
				<h:column>
					<f:facet name=""></f:facet>
				</h:column>
			</h:dataTable>
		</h:panelGrid>
	</h:form>	
</body> 
</html>
